package com.ax.base.common.service.impl;

import com.ax.base.common.dao.BaseAreaMapper;
import com.ax.base.common.domain.BaseArea;
import com.ax.base.common.service.BaseAreaService;
import com.ax.base.common.utils.ErrorUtil;
import org.apache.shiro.util.Assert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * @ClassName BaseAreaServiceImpl
 * @Description TODO
 * @Author Mr.G
 * @Date 2018/9/5 9:47
 * @Version 1.0
 */
@Service
public class BaseAreaServiceImpl implements BaseAreaService {
    @Autowired
    private BaseAreaMapper baseAreaMapper;
    /**
     * 获取省列表
     *
     * @return
     */
    @Override
    public ArrayList<BaseArea> getProvince() {
        return baseAreaMapper.getProvince();
    }

    /**
     * 获取子级列表
     *
     * @param parentId
     * @return
     */
    @Override
    public ArrayList<BaseArea> getChild(Long parentId) {
        return baseAreaMapper.getChild(parentId);
    }
}
